unit fClientDataModule;

interface

uses 
  {vcl:} SysUtils, Classes, DB, DBClient, 
  {RemObjects:} uROClient, uROClientIntf, uRORemoteService, uROBinMessage, uROSuperTcpChannel, 
  {Data Abstract:} uDADataTable, uDABin2DataStreamer, uDAInterfaces, uDARemoteDataAdapter,
  uDADataStreamer,SofitSystemLibrary_intf, uDAScriptingProvider, uDAMemDataTable,
  cxLookAndFeels, uROEventRepository,dxmdaset, dxSkinsForm, dxSkinsCore, dxSkinCaramel, dxSkinOffice2010Silver,
  dxSkinSeven;

type
  TClientDataModule = class(TDataModule)
    Message: TROBinMessage;
    Channel: TROSuperTcpChannel;
    RemoteService: TRORemoteService;
    DataStreamer: TDABin2DataStreamer;
    RemoteDataAdapter: TDARemoteDataAdapter;
    rsLogin: TRORemoteService;
    tblDynamic: TDAMemDataTable;
    rdaDynamic: TDARemoteDataAdapter;
    dxSkinController1: TdxSkinController;
    dmdPower: TdxMemData;
    dmdPowerModal: TStringField;
    dmdPowerPriceValid: TBooleanField;
    dmdPowerCostValid: TBooleanField;
    dmdPowerCheckValid: TBooleanField;
    procedure tblDynamicBeforePost(DataTable: TDADataTable);
  private
    { Private declarations }
  public
    { Public declarations }
    procedure Initialize(AHost: string; APort: Integer);
  end;

var
  ClientDataModule: TClientDataModule;
var
  ActiveUser: UserInfoEx;

var
  cScreenWidth, cScreenHeight: Integer;

implementation

{$R *.dfm}

procedure TClientDataModule.Initialize(AHost: string; APort: Integer);
begin
  Channel.Host := AHost;
  Channel.Port := APort; 
end;

procedure TClientDataModule.tblDynamicBeforePost(DataTable: TDADataTable);
begin
  rdaDynamic.UpdateDataCall.ParamByName('aTableName').AsString:= tblDynamic.LogicalName;
end;

end.
